<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LogDevice API: facebook::logdevice::ClientSettings Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LogDevice API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefacebook.html">facebook</a></li><li class="navelem"><b>logdevice</b></li><li class="navelem"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html">ClientSettings</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classfacebook_1_1logdevice_1_1_client_settings-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">facebook::logdevice::ClientSettings Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afbb241979ac979260f5d4762ea57e05b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#afbb241979ac979260f5d4762ea57e05b">set</a> (const char *name, const char *value)</td></tr>
<tr class="separator:afbb241979ac979260f5d4762ea57e05b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bc284c55ab980e562871971a7579e6a"><td class="memItemLeft" align="right" valign="top"><a id="a5bc284c55ab980e562871971a7579e6a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>set</b> (const char *name, int64_t value)</td></tr>
<tr class="separator:a5bc284c55ab980e562871971a7579e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a404fad0e7abd92991dca03c653815345"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#a404fad0e7abd92991dca03c653815345">set</a> (const std::vector&lt; std::pair&lt; std::string, std::string &gt;&gt; &amp;settings)</td></tr>
<tr class="separator:a404fad0e7abd92991dca03c653815345"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e3e08a6e1dc00ff3ea2962cdad57911"><td class="memItemLeft" align="right" valign="top">folly::Optional&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#a0e3e08a6e1dc00ff3ea2962cdad57911">get</a> (const std::string &amp;name)</td></tr>
<tr class="separator:a0e3e08a6e1dc00ff3ea2962cdad57911"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54e93e0a125fd4226dd7f5734ef6f77b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#a54e93e0a125fd4226dd7f5734ef6f77b">isOverridden</a> (const std::string &amp;name)</td></tr>
<tr class="separator:a54e93e0a125fd4226dd7f5734ef6f77b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85f7db3bfc9543580db2c5fb29b84ee3"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::pair&lt; std::string, std::string &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#a85f7db3bfc9543580db2c5fb29b84ee3">getAll</a> ()</td></tr>
<tr class="separator:a85f7db3bfc9543580db2c5fb29b84ee3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a24c0a7fa56735b0fa2ddd0216527f7b2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html">ClientSettings</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#a24c0a7fa56735b0fa2ddd0216527f7b2">create</a> ()</td></tr>
<tr class="separator:a24c0a7fa56735b0fa2ddd0216527f7b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab07fed9c5463f87ab6f515865be5b538"><td class="memItemLeft" align="right" valign="top"><a id="ab07fed9c5463f87ab6f515865be5b538"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>ClientSettingsImpl</b></td></tr>
<tr class="separator:ab07fed9c5463f87ab6f515865be5b538"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a24c0a7fa56735b0fa2ddd0216527f7b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24c0a7fa56735b0fa2ddd0216527f7b2">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html">ClientSettings</a>* facebook::logdevice::ClientSettings::create </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Creates an instance with default settings. </p>

</div>
</div>
<a id="a0e3e08a6e1dc00ff3ea2962cdad57911"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e3e08a6e1dc00ff3ea2962cdad57911">&#9670;&nbsp;</a></span>get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">folly::Optional&lt;std::string&gt; facebook::logdevice::ClientSettings::get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>setting name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If the setting exists, returns the value in a string format, otherwise folly::none </dd></dl>

</div>
</div>
<a id="a85f7db3bfc9543580db2c5fb29b84ee3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85f7db3bfc9543580db2c5fb29b84ee3">&#9670;&nbsp;</a></span>getAll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::pair&lt;std::string, std::string&gt; &gt; facebook::logdevice::ClientSettings::getAll </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Returns a vector of &lt;setting, value&gt; pairs for all settings </dd></dl>

</div>
</div>
<a id="a54e93e0a125fd4226dd7f5734ef6f77b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54e93e0a125fd4226dd7f5734ef6f77b">&#9670;&nbsp;</a></span>isOverridden()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool facebook::logdevice::ClientSettings::isOverridden </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>setting name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If the setting was overridden by calling the <a class="el" href="classfacebook_1_1logdevice_1_1_client_settings.html#afbb241979ac979260f5d4762ea57e05b">set()</a> method on this instance, returns true. False otherwise. </dd></dl>

</div>
</div>
<a id="afbb241979ac979260f5d4762ea57e05b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbb241979ac979260f5d4762ea57e05b">&#9670;&nbsp;</a></span>set() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int facebook::logdevice::ClientSettings::set </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Changes a setting.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>setting name, as would be provided on the server command line (see Settings::addOptions() in logdevice/common/Settings.cpp) </td></tr>
    <tr><td class="paramname">value</td><td>string representation of value, as would be provided on the server command line</td></tr>
  </table>
  </dd>
</dl>
<p>Settings that are commonly used on the client:</p>
<p>connect-timeout Connection timeout</p>
<p>handshake-timeout Timeout for LogDevice protocol handshake sequence</p>
<p>num-workers Number of worker threads on the client</p>
<p>client-read-buffer-size Number of records to buffer while reading</p>
<p>max-payload-size The maximum payload size that could be appended by the client</p>
<p>ssl-boundary Enable SSL in cross-X traffic, where X is the setting. Example: if set to "rack", all cross-rack traffic will be sent over SSL. Can be one of "none", "node", "rack", "row", "cluster", "dc" or "region". If a value other than "none" or "node" is specified, &ndash;my-location has to be specified as well.</p>
<p>my-location Specifies the location of the machine running the client. Used for determining whether to use SSL based on &ndash;ssl-boundary. Format: "{region}.{dc}.{cluster}.{row}.{rack}"</p>
<p>client-initial-redelivery-delay Initial delay to use when downstream rejects a record or gap</p>
<p>client-max-redelivery-delay Maximum delay to use when downstream rejects a record or gap</p>
<p>on-demand-logs-config Set this to true if you want the client to get log configuration on demand from the server when log configuration is not included in the main config file.</p>
<p>enable-logsconfig-manager Set this to true if you want to use the internal replicated storage for logs configuration, this will ignore loading the logs section from the config file.</p>
<dl class="section return"><dt>Returns</dt><dd>On success, returns 0. On failure, returns -1 and sets logdevice::err to:</dd></dl>
<p>UNKNOWN_SETTING name parameter was not recognized INVALID_SETTING_VALUE value was invalid (e.g. not numeric for a numeric setting) INVALID_PARAM any other error </p>

</div>
</div>
<a id="a404fad0e7abd92991dca03c653815345"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a404fad0e7abd92991dca03c653815345">&#9670;&nbsp;</a></span>set() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int facebook::logdevice::ClientSettings::set </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::pair&lt; std::string, std::string &gt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Overload to set any number of settings. If any one encounters an error, no subsequent ones are set. A log message is printed describing the one that failed. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Users/chunma/fbsource/fbcode/logdevice/include/<a class="el" href="_client_settings_8h_source.html">ClientSettings.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<hr class="footer"/><address class="footer">
<small>
LogDevic API v2.35
</small>
</address>
</body>
</html>
